package com.eunion.boot.settings.datasource.impl;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;

import com.eunion.boot.settings.datasource.IEnvConfig;

@Component
@Profile("dev")
public class EnvConfigDevelopment implements IEnvConfig {

    @Value("${spring.datasource.url}")
    private String url;

    @Value("${spring.datasource.username}")
    private String username;

    @Value("${spring.datasource.password}")
    private String password;

    @Value("${spring.datasource.driver-class-name}")
    private String driverClassName;

    @Value("${dbpool.init_size}")
    private int initSize;

    @Value("${dbpool.max_size}")
    private int maxSize;

    @Value("${dbpool.min_size}")
    private int minSize;

    @Value("${dbpool.acquire_increment}")
    private int acquireIncrement;

    @Value("${dbpool.idle_test_period}")
    private int idleTestPeriod;

    @Value("${dbpool.max_statements}")
    private int maxStatements;

    @Value("${dbpool.max_idle_time}")
    private int maxIdleTime;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getDriverClassName() {
        return driverClassName;
    }

    public void setDriverClassName(String driverClassName) {
        this.driverClassName = driverClassName;
    }

    public int getInitSize() {
        return initSize;
    }

    public void setInitSize(int initSize) {
        this.initSize = initSize;
    }

    public int getMaxSize() {
        return maxSize;
    }

    public void setMaxSize(int maxSize) {
        this.maxSize = maxSize;
    }

    public int getMinSize() {
        return minSize;
    }

    public void setMinSize(int minSize) {
        this.minSize = minSize;
    }

    public int getAcquireIncrement() {
        return acquireIncrement;
    }

    public void setAcquireIncrement(int acquireIncrement) {
        this.acquireIncrement = acquireIncrement;
    }

    public int getIdleTestPeriod() {
        return idleTestPeriod;
    }

    public void setIdleTestPeriod(int idleTestPeriod) {
        this.idleTestPeriod = idleTestPeriod;
    }

    public int getMaxStatements() {
        return maxStatements;
    }

    public void setMaxStatements(int maxStatements) {
        this.maxStatements = maxStatements;
    }

    public int getMaxIdleTime() {
        return maxIdleTime;
    }

    public void setMaxIdleTime(int maxIdleTime) {
        this.maxIdleTime = maxIdleTime;
    }

}
